class DetailPicBarModel {
    int goodsId;
    String cover;
    String name;
    dynamic price;
    dynamic discountPrice;
    int status;
    int learnerCount;
    String courseContent;
    List<CourseModuleList> courseModuleList;
    int bottomStatus;
    int lessonCount;
    dynamic openModuleId;
    int openModuleIndex;
    int serviceDays;

    DetailPicBarModel({
        this.goodsId,
        this.cover,
        this.name,
        this.price,
        this.discountPrice,
        this.status,
        this.learnerCount,
        this.courseContent,
        this.courseModuleList,
        this.bottomStatus,
        this.lessonCount,
        this.openModuleId,
        this.openModuleIndex,
        this.serviceDays,
    });

    factory DetailPicBarModel.fromJson(Map<String, dynamic> json) => new DetailPicBarModel(
        goodsId: json["goodsId"],
        cover: json["cover"],
        name: json["name"],
        price: json["price"],
        discountPrice: json["discountPrice"],
        status: json["status"],
        learnerCount: json["learnerCount"],
        courseContent: json["courseContent"],
        courseModuleList: new List<CourseModuleList>.from(json["courseModuleList"].map((x) => CourseModuleList.fromJson(x))),
        bottomStatus: json["bottomStatus"],
        lessonCount: json["lessonCount"],
        openModuleId: json["openModuleId"],
        openModuleIndex: json["openModuleIndex"],
        serviceDays: json["serviceDays"],
    );

    Map<String, dynamic> toJson() => {
        "goodsId": goodsId,
        "cover": cover,
        "name": name,
        "price": price,
        "discountPrice": discountPrice,
        "status": status,
        "learnerCount": learnerCount,
        "courseContent": courseContent,
        "courseModuleList": new List<dynamic>.from(courseModuleList.map((x) => x.toJson())),
        "bottomStatus": bottomStatus,
        "lessonCount": lessonCount,
        "openModuleId": openModuleId,
        "openModuleIndex": openModuleIndex,
        "serviceDays": serviceDays,
    };
}

class CourseModuleList {
    int moduleId;
    String moduleName;
    List<LessonList> lessonList;

    CourseModuleList({
        this.moduleId,
        this.moduleName,
        this.lessonList,
    });

    factory CourseModuleList.fromJson(Map<String, dynamic> json) => new CourseModuleList(
        moduleId: json["moduleId"],
        moduleName: json["moduleName"],
        lessonList: new List<LessonList>.from(json["lessonList"].map((x) => LessonList.fromJson(x))),
    );

    Map<String, dynamic> toJson() => {
        "moduleId": moduleId,
        "moduleName": moduleName,
        "lessonList": new List<dynamic>.from(lessonList.map((x) => x.toJson())),
    };
}

class LessonList {
    int lessonId;
    int videoId;
    String courseName;
    String videoName;
    int isFree;
    int isWatch;
    dynamic watching;
    int learnRate;
    String teacherAvatarUrl;
    String teacherName;
    int lessonType;
    int moduleLessonId;

    LessonList({
        this.lessonId,
        this.videoId,
        this.courseName,
        this.videoName,
        this.isFree,
        this.isWatch,
        this.watching,
        this.learnRate,
        this.teacherAvatarUrl,
        this.teacherName,
        this.lessonType,
        this.moduleLessonId,
    });

    factory LessonList.fromJson(Map<String, dynamic> json) => new LessonList(
        lessonId: json["lessonId"],
        videoId: json["videoId"],
        courseName: json["courseName"],
        videoName: json["videoName"],
        isFree: json["isFree"],
        isWatch: json["isWatch"],
        watching: json["watching"],
        learnRate: json["learnRate"],
        teacherAvatarUrl: json["teacherAvatarUrl"],
        teacherName: json["teacherName"],
        lessonType: json["lessonType"],
        moduleLessonId: json["moduleLessonId"],
    );

    Map<String, dynamic> toJson() => {
        "lessonId": lessonId,
        "videoId": videoId,
        "courseName": courseName,
        "videoName": videoName,
        "isFree": isFree,
        "isWatch": isWatch,
        "watching": watching,
        "learnRate": learnRate,
        "teacherAvatarUrl": teacherAvatarUrl,
        "teacherName": teacherName,
        "lessonType": lessonType,
        "moduleLessonId": moduleLessonId,
    };
}
